import { ApiProperty } from '@nestjs/swagger';

//规定前端传回来参数的地方
export class CreateExebookDto {
    @ApiProperty({ description: '题目ID', example: '' })
    Id: string;
    @ApiProperty({ description: '部门/班组ID', example: 'dept1' })
    deptId: string;  //部门/班组id
    @ApiProperty({ description: '岗位ID', example: 'duty1' })
    dutyId: string;  //岗位id
    //审核流

    // @ApiProperty({ description: '题目创建时间', example: '2025-06-04 12:00:00' })
    // CreateTime: Date; // 题目创建时间 
    @ApiProperty({ description: '题目类型', example: 1 })
    Questiontype: number;  // 题目类型 1-单选 2-多选 3-填空 4-判断
    @ApiProperty({ description: '题目内容', example: '下面选项谁最憨？' })
    Questiontext: string;  //题目内容
    @ApiProperty({ description: '单选/多选选项', example: [{"text":"A.张三","correct":0}, {"text":"B.李四","correct":1}] })
    Options: { text: string; correct: number }[];  // 单选/多选选项
    // @ApiProperty({ description: '判断题', example: 1 })
    // Tfanswer: number;  // 判断题
    // @ApiProperty({ description: '填空题答案', example: [{"position":1,"answer":"答案1"}, {"position":2,"answer":"答案2"}] })
    // Fillanswer: { position: number; answer: string }[];  // 填空题答案

    @ApiProperty({ description: '题目解析', example: '体现人的性格' })
    Explanation: string;  // 题目解析
    @ApiProperty({ description: '题目难度', example: 1 })
    Difficulty: number; // 题目难度,难度等级(1-5)，1表示最简单
}
